// Copyright (c) 2020 Presto Labs Pte. Ltd.
// Author: chunhui

#pragma once

#include <cstdint>
#include <experimental/filesystem>
#include <string>
#include <unordered_map>

namespace interval_feed {

struct WriterOptions {
  bool enable_time{};
  bool enable_ohlc{};
  bool enable_vwap{};
  bool enable_volume{};
  bool enable_other_stats{};
  bool enable_market_analysis{};
};

struct IntervalFeedConfig {
  int64_t start_ts{};
  int64_t duration{};
  int resolution{};
  WriterOptions writer_option{};
  std::unordered_map<std::string, std::string> outfiles;
  std::string group{};
};

void GetIntervalFeedPathOrDie(
    const std::string& root,
    const std::string& vendor,
    const std::string& machine,
    const std::string& resolution,
    const std::string& mea,
    const std::string& date,
    std::string* out);

void GetResolutionStr(int resolution, std::string* out);

}  // namespace interval_feed
